<template>
  <div>
    <Hearder />
    <el-card>
      <el-alert
        title="提示:只能看见三级分支"
        :closable="false"
        show-icon
        type="warning"
      >
      </el-alert>
      <el-row class="xx">
        <el-col>
          <span>选择商品分类</span>
          <el-cascader
            v-model="slectList"
            :options="cascadeList"
            :props="cascade"
            @change="handleChange"
          >
          </el-cascader>
        </el-col>
      </el-row>

       <el-tabs v-model="activeName" @tab-click="handleClick">
    <el-tab-pane label="用户管理" name="first">动态</el-tab-pane>
    <el-tab-pane label="配置管理" name="second">静态</el-tab-pane>
   
  </el-tabs>

    </el-card>
  </div>
</template>

<script>
export default {
  data() {
    return {
        activeName:'first',
      slectList: [],
      cascade: {
        value: "cat_id",
        label: "cat_name",
        children: "children",
      },
      cascadeList:[],
      getInfo: {
        type: 2,
        pagenum: 1,
        pagesize: 5,
      },
    };
  },
  methods: {
      handleClick(){
          
      },
    handleChange() {},
    async getcascadeList() {
      const { data: res } = await this.$http
        .get("categories", { params: this.getInfo })
        .catch((err) => err);
      this.cascadeList = res.data.result;
      console.log(res.data);
    },
  },
  mounted() {
    this.getcascadeList();
  },
};
</script>

<style>
.xx{
    margin: 10px;
}
</style>
